goodslist = [["野生奥特曼", "6888"], ["兰博基尼毒药破损版", "12888"], ["苹果", "1200"], ["iphonex80plus", "299"], ["五菱宏光", "30"]]
boughtgoods = []
money = int(input("支付宝多少钱:"))
print("商品:")
for i in range(len(goodslist)):
    print((i + 1), ".", goodslist[i][0], ":", goodslist[i][1])

while i>0:
    choosednumber = int(input("请输入您想买的商品编号:"))
    b = input("输入b退出")
    if choosednumber == "q":
        pass
    else:
        pass
    if b == "b":
            break
    else:
        price = int(goodslist[(choosednumber - 1)][1])
        if money >= price:
            extramoney = money - int(goodslist[choosednumber - 1][1])
            money = extramoney
            boughtgoods.append(goodslist[choosednumber - 1][0])
            print("Get it successfully!")
        else:
            print("余额不足!")
    print("所剩余额：", money)
print("所购买商品为：", boughtgoods, "所剩余额为：", money)
